import java.util.Arrays;

/**
 * @program: 11.19 02
 * @description:
 * @author: 李鑫月
 * @create: 2021-11-19 18:59
 **/
public class Test {
    public static  boolean isNumberChar(String s){
        for (int i = 0; i <s.length() ; i++) {
            char c=s.charAt(i);
//            boolean flg=Character.isDigit(c);
//            return  flg;
            if(c<'0'||c>'9'){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        String str="anbdul";
        System.out.println(str.concat("bit"));
        System.out.println(str.isEmpty());
    }
    public static void main10(String[] args) {
        String str="absdkfhalhfLFGjgL";
        String str2=str.toUpperCase();
        System.out.println(str2);
        System.out.println(str2.toLowerCase());
    }
    public static void main9(String[] args) {
        String str="abc      de   fg              ";
        System.out.print(str.trim());//去除左右空格
        System.out.println(str);
    }
    public static void main8(String[] args) {
        String str="abcdedf";
        String str2=str.substring(0);
        System.out.println(str2);
        System.out.println(str.equals(str2));
    }
    public static void main7(String[] args) {
        String str="192.168&1.1&1";
        String[] strings=str.split("\\.|&");
        for (String s:strings
             ) {
            System.out.println(s);
        }
    }
    public static void main6(String[] args) {
        String str="name=zhangsan&id=123455";
        String[] strings=str.split("&");
        for (String s:
             strings) {
            System.out.println(s);
            
        }
    }
    public static void main5(String[] args) {
        String str="abcdabcdabcdef";
        String str2=str.replace('a','q');
        System.out.println(str2);
        String str3=str.replaceFirst("abc","qwe");
        System.out.println(str3);
    }
    public static void main4(String[] args) {
        String str="asdffgsd";
        String tmp="sd";
        boolean ret=str.contains(tmp);
        System.out.println(ret);
        System.out.println("=====================");
        int index=str.lastIndexOf(tmp);
        System.out.println(index);
        System.out.println(str.endsWith("sd"));
    }
    public static void main2(String[] args) {
        byte[] bytes={22,54,67,68,88};
        String str=new String(bytes);
        System.out.println(str);
        System.out.println("++=============");
        String str2="bit";
        byte[] bytes1=str2.getBytes();
        System.out.println(Arrays.toString(bytes1));

    }
    public static void main1(String[] args) {
        String str="2903";

        System.out.println(isNumberChar(str));

    }
}
